﻿@model CmsUserGroupContainer

@helper DualListBox(string availableListBoxClass, string selectedListBoxClass, IEnumerable<SelectListItem> availableItems, IEnumerable<SelectListItem> selectedItems)
{
<fieldset class="b-dual-list">
	<div class="b-dual-list__chooser b-dual-list__chooser_w300">
		@Html.ListBox("AvailableUserGroups", availableItems, new { @class = @availableListBoxClass })
	</div>
	<div class="b-dual-list__controls">
        <input class="b-button" id="btnAdd" type="button" value=" > " />
        <input class="b-button" id="btnRemove" type="button" value=" < " />	
	</div>
	<div class="b-dual-list__chooser b-dual-list__chooser_w300">
		@Html.ListBox("SelectedUserGroups", selectedItems, new { @class = @selectedListBoxClass })
	</div>
</fieldset>	
}

@DualListBox("available-items", "selected-items", new SelectList(Model.AvailableUserGroups, "Id", "GroupNameWithSiteName"), new SelectList(Model.SelectedUserGroups, "Id", "GroupNameWithSiteName"))